package apiday06.homework.thread;

public class CurrentTreadDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        System.out.println("main线程："+main);
        doSome();

        new Thread(){
            @Override
            public void run() {
                System.out.println("自定义线程："+Thread.currentThread());
                doSome();
            }
        }.start();
    }

    static void doSome(){
        Thread t = Thread.currentThread();
        System.out.println("doSome()方法线程："+t);
    }

}
